package com.zbkj.dal.base.enums;

import cn.hutool.core.util.IdUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum QrcodeTypeEnums {

    USER_SPREAD("USER_SPREAD", "USER-INV-", "用户推广二维码"),
    MERCHANT_SPREAD("MERCHANT_SPREAD", "MER-INV-", "店铺推广二维码"),
    ;

    private final String code;
    private final String scenePrefix;
    private final String desc;

    public String generateScene(String ownerCode) {
        return code + "-" + ownerCode + "-" + IdUtil.nanoId(5);
    }
}
